feat: show a shared error state when a page fails to load#1092
Merged
igboyes merged 2 commits intoJul 3, 2026
Merged
Conversation
Add a reusable ErrorState component (icon, message, optional action) and render it from RouteError's retryable branch. Wire an errorComponent on the root route so failures in the root shell are caught too.
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- For
ErrorState, consider allowing a custom icon (or making the icon optional) so that the component can be reused in contexts where a different visual treatment is needed while still sharing the layout and messaging. - The error icon in
ErrorStatecurrently lacks any accessibility semantics; either mark itaria-hiddenif decorative or expose a meaningfularia-label/titleand use a more semantic wrapper (e.g. a heading) for the main error message. - The hard-coded
h-96height inErrorStatemight be too rigid for all layouts; consider making the height configurable or relying on padding/margins so the component adapts better to varying container sizes.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- For `ErrorState`, consider allowing a custom icon (or making the icon optional) so that the component can be reused in contexts where a different visual treatment is needed while still sharing the layout and messaging.
- The error icon in `ErrorState` currently lacks any accessibility semantics; either mark it `aria-hidden` if decorative or expose a meaningful `aria-label`/`title` and use a more semantic wrapper (e.g. a heading) for the main error message.
- The hard-coded `h-96` height in `ErrorState` might be too rigid for all layouts; consider making the height configurable or relying on padding/margins so the component adapts better to varying container sizes.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Mark the default error icon aria-hidden since the message conveys the meaning, and add an optional icon prop so other views can supply a different visual.
Member
Author
|
Addressed in 9463b78:
Skipped:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
@base/ErrorStatecomponent (icon, message, optional action) that accepts the standard color palette, and render it fromRouteError's retryable branch.errorComponenton the root route so render failures in the root shell are caught, not just child-route failures covered by the router'sdefaultErrorComponent.docs/queries.md; add tests forErrorState.Closes VIR-2480.